package cmd

import (
	"github.com/spf13/cobra"
	global2 "longmen/server/config/global"
	football2 "longmen/server/internal/services/nami/api/v5/sports/football"
	"longmen/server/internal/services/nami/config"
	"longmen/server/pkg/db/mysql/models/models_sports"
)

var venue = &cobra.Command{
	Use:   "venue",
	Short: "同步足球场馆数据",
	Long:  "同步足球场馆数据",
	Run: func(cmd *cobra.Command, args []string) {
		global2.Sport().AutoMigrate(models_sports.FootballVenue{})
		ball := football2.InitFootBall{}
		ball.SyncVenue()

		f := football2.Football{}
		f.SyncVenue()
	},
	PreRun: func(cmd *cobra.Command, args []string) {
		global2.Initialize(configFile)
		config.InitConfig()

	},
	PostRun: func(cmd *cobra.Command, args []string) {

	},
}
